<include file="Public/header"/>
<include file="Public/menu"/>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/admin/adminlte/plugins/select2/select2.min.css">
<!-- 内容页 -->
<div class="content-wrapper">
    <!-- 面包屑 -->
    <section class="content-header">
        <h1>
            文章管理
            <small>管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="{:U('Artice/index')}"><i class="fa fa-dashboard"></i> 文章管理</a></li>
            <li><a href="{:U('Artice/index')}"><i class="fa fa-dashboard"></i>文章管理</a></li>
            <li class="active">添加</li>
        </ol>
    </section>

    <!-- 内容 -->
    <section class="content">

        <div class="row">
            <div class="col-md-12">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">编辑文章</h3>
                        <div class="box-tools">
                            <div class="btn-group pull-right" style="margin-right: 10px">
                                <a href="{:U('Artice/index')}" class="btn btn-sm btn-default"><i
                                        class="fa fa-list"></i>&nbsp;返回列表</a>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form id="form" action="{:U('Artice/add')}" method="post" accept-charset="UTF-8" class="form-horizontal" onsubmit="return checkSubmit()">
                        <input name="id" value="{$info.id}" type="hidden" class="form-control" placeholder="输入文章标题">

                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="InputVendorName">文章标题</label>
                                <div class="col-sm-6">
                                    <div class="no-margin">
                                        <input name="title" value="{$info.title}" type="text" class="form-control" placeholder="输入文章标题">
                                    </div>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="specialContent">专题内容</label>
                                <div class="col-sm-6">
                                    <textarea id="specialContent">{$info.content}</textarea>
                                    <input type="hidden" name="content" value="{$info.content}">
                                </div>
                            </div>
                            <!--<div class="form-group">
                                <label class="col-sm-2 control-label" for="InputStatus">可见会员来源</label>
                                <div class="col-sm-6">
                                    <select class="form-control  select2-hidden-accessible" style="width: 100%;" id="InputStatus" name="source" tabindex="-1" aria-hidden="true">
                                        <option value="" <if condition="$info['source'] eq ''">selected="selected"</if>">请选择来源</option>
                                        <option value="1" <if condition="$info['source'] eq 1">selected="selected"</if>">平安会员</option>
                                    </select>
                                </div>
                            </div>-->

                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="col-sm-2">
                            </div>
                            <div class="col-sm-6">
                                <div class="btn-group pull-right">
                                    <button type="submit" class="btn btn-info pull-right">提交</button>
                                </div>
                            </div>

                        </div>
                        <!-- /.box-footer -->
                    </form>
                </div>

            </div>
        </div>

    </section>
</div>
<!-- 底部 -->
<include file="Public/common_footer"/>
<link rel="stylesheet" href="/Public/admin/fileinput/fileinput.min.css">
<script src="/Public/admin/fileinput/fileinput.min.js"></script>
<script src="/Public/admin/adminlte/plugins/select2/select2.full.min.js"></script>
<link rel="stylesheet" href="/Public/admin/jedate/jedate.css" />
<script src="/Public/admin/jedate/jedate.js"></script>
<script type="text/javascript">

    var ue = UE.getEditor('specialContent', {
        autoHeight: false,
        initialFrameHeight: 500,
    });
    ue.ready(function () {
        //设置编辑器的内容
//       var content = "<?php echo $info['content'];?>";
//         ue.setContent(content);
    });


    function checkSubmit() {
        var content = ue.getContent();
        $('input[name=content]').val(content);
        return true;
    }

</script>


